package com.hqyj.controller;

import com.hqyj.exception.R;
import com.hqyj.pojo.UserInfo;
import com.hqyj.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/login")
public class UserInfoController {

    @Autowired
    UserInfoService userInfoService;

    @PostMapping("/user")
    public R login(@RequestBody UserInfo userInfo){
        return userInfoService.login(userInfo);
    }

}
